/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.aptech.sBean;

import com.aptech.entities.TblWorking;
import java.util.List;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import javax.persistence.Query;

/**
 *
 * @author Winner
 */
@Stateless
public class TblWorkingFacade extends AbstractFacade<TblWorking> {

    @PersistenceContext(unitName = "Elevation_System_Online-ejbPU")
    private EntityManager em;

    @Override
    protected EntityManager getEntityManager() {
        return em;
    }

    public TblWorkingFacade() {
        super(TblWorking.class);
    }
     public List<TblWorking> getTblWorkingByWkID(int wkID){
        Query query=em.createNamedQuery("TblWorking.findByWkID");
        query.setParameter("wkID", wkID);
        return query.getResultList();
    }
}
